﻿#ifndef NSSHARE_SYS_SPIN_LOCK_H_
#define NSSHARE_SYS_SPIN_LOCK_H_

#include "../base/atomic.h"

namespace nsshare
{
namespace sys
{

class SpinLock
{
public:
    SpinLock();
    ~SpinLock();

    bool TryAcquire();
    void Acquire();
    void Release();
private:
    base::Atomic locker_;
};


}
}

#endif